<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"  %>
<%@include file="/survey/include/head.jsp"%>
<body>
<div id="demo">
    <div id="mainbox">
        <div id="box">
<%@include file="/survey/include/top.jsp"%>
           <div class="right">
                <div class="banner"><img src="<%=request.getContextPath() %>/survey/images/about_banner.jpg" width="703" height="183" /></div>
             <div class="tj_news" style="float:left; width:97%;">
               <h1>问题的信息</h1><a name="question"></a>
               <div class="dd">
  <form id="form1" name="form1" method="post" action="<%=request.getContextPath() %>/symanage/question/addquestion.htm">            
  <label>问题名称：
  <input type="text" name="qn_name" id="qn_name" value="${tquestion.qn_name }" size="70" maxlength="100"/>
  <input type="hidden" value="${tbase.id}" name="sy_id"/>
  <input type="hidden" value="${tquestion.id}" name="id"/>
  </label>
  <p>
    <label>问题类型：
    <select name="qn_type" size="1" id="qn_type" ${tquestion.qn_type}>
      <option value="1" <c:if test="${tquestion.qn_type=='1'}">selected</c:if>>单选题</option>
      <option value="2" <c:if test="${tquestion.qn_type=='2'}">selected</c:if>>单选题其他</option>
      <option value="3" <c:if test="${tquestion.qn_type=='3'}">selected</c:if>>多选题</option>
      <option value="4" <c:if test="${tquestion.qn_type=='4'}">selected</c:if>>多选题其他</option>
      <option value="5" <c:if test="${tquestion.qn_type=='5'}">selected</c:if>>问答题</option>
    </select>
    </label>
  </p>
  <p>
    <label>问题的选项：(选项以换行来排列，排列顺序为行号)<br />
    <textarea name="qn_options" id="qn_options" cols="45" rows="5">${tquestion.qn_options}</textarea>
    </label>
  </p>
  <p>
    <label>问题排序:（按照数字由小向大顺序排列）
    <input type="text"  name="qn_order" id="qn_order" value="${tquestion.qn_order}" size="3" maxlength="4"/>
    </label>
  </p>
  <p>
  <label>问题状态
  <select name="qn_isstop" ${tquestion.qn_isstop}>
  <option value="0" <c:if test="${tquestion.qn_isstop=='0'}">selected</c:if>>启用</option>
  <option value="1" <c:if test="${tquestion.qn_isstop=='1'}">selected</c:if>>停用</option>
  </select>
  </label>
  </p>
  <p>
     <input type="submit" value="确认保存" onclick="return confirm('您是否确认保存该问题内容？')"/>   
      <input type="reset" value="重置"  /><input type="button" value="返回" onclick="location.href='../baseinfo/list.htm'"/>
  </p>
  </form>
  <table width="700" border="1">
    <tr>
      <td width="30">问题id</td>
      <td width="60">问题名称</td>
      <td width="30">问题类型</td>
      <td width="120">问题的选项</td>
      <td width="30">问题排序</td>
      <td width="30">状态</td>
      <td width="100">所属问卷名称</td>
      <td width="60">操作</td>
    </tr>
     <c:forEach var="c" items="${list}">
    <tr>
      <td>${c.id }</td>
      <td>${c.qn_name }</td>
      <td><c:if test="${c.qn_type=='1'}">单选题</c:if><c:if test="${c.qn_type=='2'}">单选题其他</c:if>
      <c:if test="${c.qn_type=='3'}">多选题</c:if><c:if test="${c.qn_type=='4'}">多选题其他</c:if>
      <c:if test="${c.qn_type=='5'}">问答题</c:if></td>
      <td>${c.qn_options }</td>
      <td>${c.qn_order }</td>
      <td><c:if test="${c.qn_isstop=='1'}">停用</c:if><c:if test="${c.qn_isstop=='0'}">启用</c:if></td>
      <td>${tbase.sy_name} </td>
      <td>
      <a href="#" onclick="if(confirm('确认删除该问题吗？')){location.href='<%=request.getContextPath() %>/symanage/question/delequestion.htm?id=${c.id}&sy_id=${c.sy_id }'}"><img src="<%=request.getContextPath() %>/symanage/js/kindeditor/plugins/image/images/del.png" ></a>
      <a href="<%=request.getContextPath() %>/symanage/question/question.htm?id=${c.id}&sy_id=${c.sy_id }"><img src="<%=request.getContextPath() %>/symanage/js/kindeditor/plugins/image/images/edit.png" ></a>
      <c:if test="${c.qn_isstop=='0'}">
       <a href="#"  onclick="if(confirm('您确认停用该问题吗？如果停用后，请重新发布才能生效。')){location.href='starbase.htm?id=${c.id }'}" title="停用">
       <img src="<%=request.getContextPath() %>/symanage/js/kindeditor/plugins/image/images/stop.png" >
       </a>
       </c:if>
      <c:if test="${c.qn_isstop=='1'}">
       <a href="#"  onclick="if(confirm('您确认启用该问题吗？如果启用后，请重新发布才能生效。')){location.href='starbase.htm?id=${c.id }'}" title="启用">
       <img src="<%=request.getContextPath() %>/symanage/js/kindeditor/plugins/image/images/star.png" >
       </a>
      </c:if>
      </td>
    </tr>
   </c:forEach>
  
  </table>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
                 </div>
                </div>
                <div class="clear"></div>
		</div>
            <div class="clear"></div>
<%@include file="/survey/include/bottom.jsp"%>
        </div>
    </div>
</div>
</body>
</html>

